package com.jsb.laundry.dao;

import com.jsb.laundry.model.entity.ActivityDetail;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ActivityDao {


    /**
     * 月卡预下单(入库)
     *
     * @param monthCardData
     * @return
     */
    int monthCardDataSave(@Param("list") List monthCardData);

    /**
     * 获取商品信息
     * @param activityId
     * @return
     */
    int getProductPrice(@Param("productId")String activityId,@Param("serveId")String serveId);

    /**
     * 修改月卡支付状态
     * @param orderId
     * @return
     */
    int updMonthCardStatus(String orderId);

    /**
     * 用户校服包月卡列表
     * @param userId
     * @return
     */
    List<ActivityDetail> userSchoolCardBag(String userId);

    /**
     * 校服活动订单处理list
     * @param userId
     * @param productId
     * @return
     */
    List<ActivityDetail> schoolActivityOrder(@Param("userId")String userId,@Param("productId")String productId);

    /**
     * 判断当前校服包月卡是否可用
     * @param userId
     * @param holdSchoolCardId
     * @return
     */
    int checkSchoolAvailable(@Param("userId") String userId,@Param("holdSchoolCardId") String holdSchoolCardId);

    /**
     * 添加校服购买记录
     */
    int addSchoolRecord(@Param("list") List schoolData);

    int updUseSchoolCard(ActivityDetail data);

    /**
     *school_record更新用户校服背包支付状态
     * @param userId
     * @param orderId
     * @return
     */
    int updSchoolDeal(@Param("userId") String userId, @Param("orderId") String orderId);
}
